using ApprovalTests;
using ApprovalTests.Reporters;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace SmallBasicFun.Tests
{
	[TestClass]
	
	public class ColorTest
	{
		[TestMethod]
		public void TestLighten()
		{
			var c1 = Colors.Black;
			var c2 = Colors.Lighten(c1);
			Approvals.Verify(c1 + " => " + c2);
		}

		[TestMethod]
		public void TestDarken()
		{
			var c1 = Colors.Red;
			var c2 = Colors.Darken(c1);
			Approvals.Verify(c1 + " => " + c2);
		}

		[TestMethod]
		public void TestCompare()
		{
			Assert.IsTrue(Colors.CompareColors(Colors.Yellow, "Yellow"));
			Assert.IsTrue(Colors.CompareColors(Colors.Yellow, "#FFFF00"));
			Assert.IsFalse(Colors.CompareColors(Colors.Yellow, null));
		}

        [TestMethod]
        public void TestConvertToString()
        {
            Tortoise.SetPenColor(Colors.Yellow);
            var yellow = Tortoise.GetPenColor();
            Assert.AreEqual( "Yellow",Colors.GetNameFor(yellow));
           
        }

	}
}